package com.coffee.sku.api.sku.service;

import com.coffee.core.entity.Page;
import com.coffee.core.entity.PagerInfo;
import com.coffee.core.exception.BusinessException;
import com.coffee.sku.api.sku.query.SkuContentQuery;
import com.coffee.sku.api.sku.req.*;
import com.coffee.sku.api.sku.result.MerchantSkuContentResult;
import com.coffee.sku.api.sku.result.MerchantSkuListResult;
import com.coffee.sku.api.sku.result.SkuContentResult;
import com.coffee.sku.api.sku.result.SkuListResult;

import java.util.List;
import java.util.Map;
import java.util.Set;


public interface SkuContentService {

    Page<SkuContentResult> getPager(SkuContentQuery param, PagerInfo pr);

    Page<SkuListResult> findList(SkuListReq param, PagerInfo pr);

    Page<MerchantSkuListResult> findMerchantSkuList(MerchantSkuListReq param, PagerInfo pr);

    Integer count(SkuContentQuery param);

    SkuContentResult getDetail(Integer id) throws BusinessException;

    List<SkuContentResult> getList(SkuContentQuery param, PagerInfo pr);

    List<SkuContentResult> getList(SkuContentQuery param);

    List<SkuContentResult> getList();

    void delete(Integer id);

    void addOrUpdate(SkuContentResult result) throws BusinessException;

    void addSku(SkuAddReq skuAddReq) throws BusinessException;

    void updateSku(SkuUpdateReq skuAddReq) throws BusinessException;

    void updateIsEnable(Integer id, String isEnable, String skuType, Integer supplierId) throws BusinessException;

    void updateIsDisable(Integer id, String isDisable, String skuType);

    void updateIsApprove(Integer id, String isApprove, String approveRefuseReason, String skuType);

    void updateSort(List<AddSkuSortReq> addSkuSortReq, Integer categoryId);

    Map<Integer, SkuContentResult> getItemMap(Set<Integer> idSet);

    Map<Integer, SkuContentResult> getItemMap();

    MerchantSkuContentResult getMerchantSkuContentResult(Integer skuId, Integer merchantId, Integer cityId, String type) throws BusinessException;

}